log
Natural logarithm
log() returns natural logarithm.
<?php echo lcg_value ( ) ; ?>
Try it yourself
log ( x , base )
| parameter | describe |
|---|---|
| x | Required. A number. |
| base | Optional. If this parameter is specified, log base x is returned. |
If an optional parameter base is specified, log() returns log base x , otherwise log() returns the natural logarithm of parameter x .
Note: The parameter base is available since PHP 4.3.0. You can calculate any logarithm with n based on b, but in fact, you use the mathematical equation: logb(n) = log(n)/log(b), where log is a natural logarithm.